package edu.ccut.saturn.manager.bundles.core;

import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IDataInfo;
import edu.ccut.saturn.component.IDataItem;
import edu.ccut.saturn.component.IParameterContext;
import edu.ccut.saturn.component.SaturnDataManager;

public class GetSaturnItemValidateInfo extends DefaultComponent {
	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		String dataFullKey = (String) parameterContext.getParameterValue(0);
		String saturnItemName = (String) parameterContext.getParameterValue(1);
		IDataInfo dataInfo = SaturnDataManager.getInstance().getSaturnDataInfo(dataFullKey);
		IDataItem dataItem = dataInfo.getDataItem(saturnItemName);
		parameterContext.setParameter(2, dataItem.getValidateUseInfo().getValidateInfos());
	}
}